/*
 * @Author: linjituan linjituan@revolution.com
 * @Date: 2024-11-25 14:46:26
 * @LastEditors: linjituan linjituan@revolution.com
 * @LastEditTime: 2024-11-25 14:46:53
 * @FilePath: \hm-twx-admin\src\utils\showapi.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// showapi相关接口
import { get, post } from './http/axios'

export const getMetaIdByZoreAddress = (zeroAddress) => {
	const p = '{"data":"{\\"zeroAddress\\":\\"' + zeroAddress + '\\"}"}'
	return post(
		'https://api.showmoney.app/serviceapi/api/v1/metago/getMetaIdByZoreAddress',
		p,
		{
			headers: {
				'content-type': 'application/json'
			}
		}
	)
}

export const getUserSimpleInfo = (rootTxId) => {
	return get(
		'https://api.showmoney.app/aggregation/v2/app/user/getUserSimpleInfo/' +
			rootTxId,
			undefined,
			undefined
	)
}

export const notify = (txHex) => {
	return post('https://api.show3.io/metaid-base/v1/meta/upload/raw', {
		raw: txHex,
		type: 201
	},
	undefined
	)
}
